# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[self._ThreadedOneShotTimer__cb = callback
self._ThreadedOneShotTimer__interval = 0.10000000000000001
self._stopped = False
self._ThreadedOneShotTimer__in_execution = False
self._args = args
self._kw = kw
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7762c8c>}
nname: 128
n 128(None)[self._ThreadedOneShotTimer__in_execution = False
]:
	i: 35(JA), 71(JA), 104(JA), 124(), 127()
	o: 

nname: 127
n 127(None)[]:
	i: 0(t)
	o: 128()

nname: 104
n 104(None)[print 'Error executing timer %s' % self._ThreadedOneShotTimer__cb
]:
	i: 61(f)
	o: 128(JA)

nname: 71
n 71(None)[#, e
print 'Error executing timer %s: %s' % (self._ThreadedOneShotTimer__cb, str(e))
]:
	i: 61(t)
	o: 128(JA)

nname: 61
n 61(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 31(except)
	o: 71(t), 104(f)

nname: 35
n 35(None)[self._ThreadedOneShotTimer__cb(*self._args, **self._kw)
]:
	i: 31(try)
	o: 128(JA)

nname: 31
n 31(None)[]:
	i: 0(f)
	o: 35(try), 61(except)

nname: 0
n 0(self._stopped)[self._ThreadedOneShotTimer__in_execution = True
sleep(self._ThreadedOneShotTimer__interval)
]:
	i: 
	o: 31(f), 127(t)

nname: 128
n 128(None)[self._ThreadedOneShotTimer__in_execution = False
]:
	i: 61(JA), 124(), 0(t)
	o: 

nname: 61
n 61(None)[except Exception, e:
	print 'Error executing timer %s: %s' % (self._ThreadedOneShotTimer__cb, str(e))
except:
	print 'Error executing timer %s' % self._ThreadedOneShotTimer__cb
]:
	i: 31()
	o: 128(JA)

nname: 31
n 31(None)[try:
	self._ThreadedOneShotTimer__cb(*self._args, **self._kw)
]:
	i: 0(f)
	o: 61()

nname: 0
n 0(self._stopped)[self._ThreadedOneShotTimer__in_execution = True
sleep(self._ThreadedOneShotTimer__interval)
]:
	i: 
	o: 31(f), 128(t)

nname: 128
n 128(None)[self._ThreadedOneShotTimer__in_execution = False
]:
	i: 31(JA), 124(), 0(t)
	o: 

nname: 31
n 31(None)[try:
	self._ThreadedOneShotTimer__cb(*self._args, **self._kw)
except Exception, e:
	print 'Error executing timer %s: %s' % (self._ThreadedOneShotTimer__cb, str(e))
except:
	print 'Error executing timer %s' % self._ThreadedOneShotTimer__cb
]:
	i: 0(f)
	o: 128(JA)

nname: 0
n 0(self._stopped)[self._ThreadedOneShotTimer__in_execution = True
sleep(self._ThreadedOneShotTimer__interval)
]:
	i: 
	o: 31(f), 128(t)

nname: 128
n 128(None)[self._ThreadedOneShotTimer__in_execution = False
]:
	i: 124(), 0(t)
	o: 

nname: 0
n 0(None)[self._ThreadedOneShotTimer__in_execution = True
sleep(self._ThreadedOneShotTimer__interval)
if not self._stopped:
	try:
		self._ThreadedOneShotTimer__cb(*self._args, **self._kw)
	except Exception, e:
		print 'Error executing timer %s: %s' % (self._ThreadedOneShotTimer__cb, str(e))
	except:
		print 'Error executing timer %s' % self._ThreadedOneShotTimer__cb
]:
	i: 
	o: 128(JA)

self.nodes: {0: <unpyclib.structure.node instance at 0xb776a6cc>, 128: <unpyclib.structure.node instance at 0xb776a68c>, 123: <unpyclib.structure.node instance at 0xb776a4ec>, 124: <unpyclib.structure.node instance at 0xb776a58c>}
nname: 23
n 23(None)[self._ThreadedOneShotTimer__interval = interval
self._stopped = False
start_new_thread(self._execute, tuple())
return self
]:
	i: 9(), 22()
	o: 

nname: 22
n 22(None)[]:
	i: 0(f)
	o: 23()

nname: 9
n 9(None)[print 'Starting a started timer, do nothing...'
]:
	i: 0(t)
	o: 23()

nname: 0
n 0(self._ThreadedOneShotTimer__in_execution)[]:
	i: 
	o: 9(t), 22(f)

nname: 0
n 0(None)[if self._ThreadedOneShotTimer__in_execution:
	print 'Starting a started timer, do nothing...'
self._ThreadedOneShotTimer__interval = interval
self._stopped = False
start_new_thread(self._execute, tuple())
return self
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7762d6c>}
nname: 0
n 0(None)[self._stopped = True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb776280c>}
nname: 6
n 6(None)[def __init__(self, callback, args=[], kw={}):
	self._ThreadedOneShotTimer__cb = callback
	self._ThreadedOneShotTimer__interval = 0.10000000000000001
	self._stopped = False
	self._ThreadedOneShotTimer__in_execution = False
	self._args = args
	self._kw = kw

def _execute(self):
	self._ThreadedOneShotTimer__in_execution = True
	sleep(self._ThreadedOneShotTimer__interval)
	if not self._stopped:
		try:
			self._ThreadedOneShotTimer__cb(*self._args, **self._kw)
		except Exception, e:
			print 'Error executing timer %s: %s' % (self._ThreadedOneShotTimer__cb, str(e))
		except:
			print 'Error executing timer %s' % self._ThreadedOneShotTimer__cb

def start(self, interval):
	if self._ThreadedOneShotTimer__in_execution:
		print 'Starting a started timer, do nothing...'
	self._ThreadedOneShotTimer__interval = interval
	self._stopped = False
	start_new_thread(self._execute, tuple())
	return self

def stop(self):
	self._stopped = True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb776242c>}
nname: 46
n 46(None)[]:
	i: 22(), 45()
	o: 

nname: 45
n 45(None)[]:
	i: 0(t)
	o: 46()

nname: 22
n 22(None)[start_new_thread(self._execute, tuple())
]:
	i: 0(f)
	o: 46()

nname: 0
n 0(self._stopped)[ThreadedOneShotTimer._execute(self)
]:
	i: 
	o: 22(f), 45(t)

nname: 0
n 0(None)[ThreadedOneShotTimer._execute(self)
if not self._stopped:
	start_new_thread(self._execute, tuple())
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb77626cc>}
nname: 6
n 6(None)[def _execute(self):
	ThreadedOneShotTimer._execute(self)
	if not self._stopped:
		start_new_thread(self._execute, tuple())

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb776216c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from time import sleep
from thread import start_new_thread
class ThreadedOneShotTimer(object):
	def __init__(self, callback, args=[], kw={}):
		self._ThreadedOneShotTimer__cb = callback
		self._ThreadedOneShotTimer__interval = 0.10000000000000001
		self._stopped = False
		self._ThreadedOneShotTimer__in_execution = False
		self._args = args
		self._kw = kw

	def _execute(self):
		self._ThreadedOneShotTimer__in_execution = True
		sleep(self._ThreadedOneShotTimer__interval)
		if not self._stopped:
			try:
				self._ThreadedOneShotTimer__cb(*self._args, **self._kw)
			except Exception, e:
				print 'Error executing timer %s: %s' % (self._ThreadedOneShotTimer__cb, str(e))
			except:
				print 'Error executing timer %s' % self._ThreadedOneShotTimer__cb

	def start(self, interval):
		if self._ThreadedOneShotTimer__in_execution:
			print 'Starting a started timer, do nothing...'
		self._ThreadedOneShotTimer__interval = interval
		self._stopped = False
		start_new_thread(self._execute, tuple())
		return self

	def stop(self):
		self._stopped = True



class ThreadedTimer(ThreadedOneShotTimer):
	def _execute(self):
		ThreadedOneShotTimer._execute(self)
		if not self._stopped:
			start_new_thread(self._execute, tuple())



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb775cc4c>}
from __future__ import absolute_import
from time import sleep
from thread import start_new_thread
class ThreadedOneShotTimer(object):
	def __init__(self, callback, args=[], kw={}):
		self._ThreadedOneShotTimer__cb = callback
		self._ThreadedOneShotTimer__interval = 0.10000000000000001
		self._stopped = False
		self._ThreadedOneShotTimer__in_execution = False
		self._args = args
		self._kw = kw

	def _execute(self):
		self._ThreadedOneShotTimer__in_execution = True
		sleep(self._ThreadedOneShotTimer__interval)
		if not self._stopped:
			try:
				self._ThreadedOneShotTimer__cb(*self._args, **self._kw)
			except Exception, e:
				print 'Error executing timer %s: %s' % (self._ThreadedOneShotTimer__cb, str(e))
			except:
				print 'Error executing timer %s' % self._ThreadedOneShotTimer__cb

	def start(self, interval):
		if self._ThreadedOneShotTimer__in_execution:
			print 'Starting a started timer, do nothing...'
		self._ThreadedOneShotTimer__interval = interval
		self._stopped = False
		start_new_thread(self._execute, tuple())
		return self

	def stop(self):
		self._stopped = True



class ThreadedTimer(ThreadedOneShotTimer):
	def _execute(self):
		ThreadedOneShotTimer._execute(self)
		if not self._stopped:
			start_new_thread(self._execute, tuple())



